package com.cskaoyan.market.controller;

import com.cskaoyan.market.service.WxHomeService;
import com.cskaoyan.market.util.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("wx/home")
public class WxHomeController {

    @Autowired
    WxHomeService wxHomeService;

    /**
     * 该方法需要ad表、category表、coupon表、goods表、topic表
     * brandList,floorGoodsList,hotGoodsList,newGoodsList,topicList
     * @return
     */
    @GetMapping("index")
    public Object index(){

        Map<String,Object> result = wxHomeService.index();
        return ResponseUtil.ok(result);
    }

}
